package net.jxvtc.eshop.domain;

import java.util.List;

public class BasePageBean<T> implements java.io.Serializable {

	public BasePageBean(int totalCount, int currentCount, List<T> ps) {
		super();
		this.totalCount = totalCount;
		this.currentCount = currentCount;
		this.totalPage=
				this.totalCount%this.currentCount==0?
			    this.totalCount/this.currentCount:
	 		    this.totalCount/this.currentCount+1;
		this.ps = ps;
	}
	
	public BasePageBean(int totalCount, List<T> ps) {
		//默认每页10条
		this(totalCount,10,ps);
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 当前页的页码
	 */
	private int currentPage;
	/**
	 * 总记录数
	 */
	private int totalCount;
	/**
	 * 总页数
	 */
	private int totalPage;
	/**
	 * 每页记录数
	 */
	private int currentCount;
	/**
	 * 分页内容
	 */
	private List<T> ps;
	public int getCurrentPage() {
		return currentPage;
	}
	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
	public int getCurrentCount() {
		return currentCount;
	}
	public void setCurrentCount(int currentCount) {
		this.currentCount = currentCount;
	}
	public List<T> getPs() {
		return ps;
	}
	public void setPs(List<T> ps) {
		this.ps = ps;
	}
	public int getTotalPage() {
		return totalPage;
	}

	
}